import React from 'react'



import './SearchList.less'


import './Item/Itemcopy.less'





import { Link } from "react-router-dom"
export default class SearchListcopy extends React.Component {


    render() {
        let data = this.props.data

        return (


            <div className="list-container">
            {
                data.map((element,index) => {
                    var item = element;
                    return (
                        <div className="list-item">

                        <Link to={`/details/${item.id}`}>
                            <img src={item.img} alt="" />
                            <div className="mask">
                                <div className="left">
                                    <p>{item.title}</p>
                                    <p>{item.houseType}</p>
                                </div>
                                <div className="right">
                                    <div className="btn">
                                        {item.rentType}
                                    </div>
                                    {/* dangerouslySetInnerHTML:识别标签结构 */}
                                    <p dangerouslySetInnerHTML={{ __html: item.price + "/月" }} />
                                </div>
                            </div>
                        </Link>
                    </div>
                    )
                    
                    
                })
            }
         </div>
            
        )
    }
}